#include "servicemanagement.h"
#include "ui_servicemanagement.h"



serviceManagement::serviceManagement(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::serviceManagement)
{
    ui->setupUi(this);
}

serviceManagement::~serviceManagement()
{
    delete ui;
}

void serviceManagement::on_sendBtn_clicked()
{
    QString text ="#3#店家：" + ui->sendEdit->text();
    ui->receiveEdit->append("我：" + ui->sendEdit->text());
    emit sendText(text);//向父窗口传递发送的信息
    ui->sendEdit->clear();//清除发送框的内容
}

void serviceManagement::textChanged(QString text){
    ui->receiveEdit->append(text);//将父窗口传来的内容添加到接收框中
}
